<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="cache-control" content="no-cache" />
<!-- Get the user locale from the page context (it was set by Spring MVC's locale resolver) -->
<c:set var="plocale">${pageContext.response.locale}</c:set>
<c:set var="userLocale">
	<c:out value="${fn:replace(plocale, '_', '-')}" default="en" />
</c:set>

<spring:message code="application_name" var="app_name" htmlEscape="false" />
<title><c:out value="${app_name}" /></title>

<!-- style -->
<spring:url value="/css/bootstrap.min.css" var="css_url_bootstrap" />
<spring:url value="/css/bootstrap-theme.min.css" var="css_url_bootstrap_theme" />
<spring:url value="/css/datepicker3.css" var="css_url_datepicker" />
<spring:url value="/css/styles.css" var="css_url_styles" />
<spring:url value="/css/app.css" var="css_url_app" />
<link href="${css_url_bootstrap}" rel="stylesheet" type="text/css" />
<link href="${css_url_bootstrap_theme}" rel="stylesheet" type="text/css" />
<link href="${css_url_datepicker}" rel="stylesheet" type="text/css" />
<link href="${css_url_styles}" rel="stylesheet" type="text/css" />
<link href="${css_url_app}" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css" />

<!-- javascript -->
<spring:url value="/js/validation.js" var="js_url_validation" />
<spring:url value="/js/jquery-1.10.2.min.js" var="js_url_jquery" />
<spring:url value="/js/bootstrap.js" var="js_url_bootstrap" />
<spring:url value="/js/bootstrap-datepicker.js" var="js_url_bootstrap_datepicker" />
<spring:url value="/js/locales/bootstrap-datepicker.${fn:substring(plocale, 0, 2)}.js" var="js_url_bootstrap_datepicker_locale" />
<script type="text/javascript" src="${js_url_validation}">
	<jsp:text/>
</script>
<script type="text/javascript" src="${js_url_jquery}">
	<jsp:text/>
</script>
<script type="text/javascript" src="${js_url_bootstrap}">
	<jsp:text/>
</script>
<script type="text/javascript" src="${js_url_bootstrap_datepicker}">
	<jsp:text/>
</script>
<script type="text/javascript" src="${js_url_bootstrap_datepicker_locale}" charset="UTF-8">
	<jsp:text/>
</script>
</head>
<body>
	<nav class="navbar navbar-inverse navbar-static-top">
		<div class="container">
			<div class="navbar-inner">
				<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a>
				<spring:url value="/" var="url_home" />
				<a class="navbar-brand logo" href="${url_home}"><spring:message code="back.welcome" /></a>
				<ul class="nav navbar-nav languages">
					<li><a class="navbar-brand" href="?lang=en_US"><span class="glyphicon glyphicon-th-large"><jsp:text /></span>English</a></li>
					<li><a class="navbar-brand" href="?lang=fr_FR"><span class="glyphicon glyphicon-th-large"><jsp:text /></span>Français</a></li>
				</ul>
			</div>
		</div>
	</nav>
	<tiles:insertAttribute name="body" />
</body>
</html>